<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade bopinsert" tabindex="-1"
    role="dialog" aria-labelledby="createOrEditModal" aria-hidden="true"
    [config]="{backdrop: 'static', keyboard: !saving}">
    <div style="width:1880px!important;margin: 1.75rem auto;">
        <div class="modal-content">
            <form *ngIf="active" #userForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>BOP管理</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')"
                        [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div>
                        <div class="m-content">
                            <div class="row">
                                <div class="col-lg-4">
                                    <span class="title">树形结构</span>
                                    <div class="m-content">
                                        <div class="m-portlet m-portlet--mobile">
                                            <div class="m-portlet__body">
                                                <!-- <div class="tabbable-line">
                                             -->
                                                <div class="row align-items-center">
                                                    <!--<Primeng-TurboTable-Start>-->
                                                    <div class="primeng-datatable-container"
                                                        [busyIf]="primengTableHelper.isLoading">
                                                        <div class="col-md-12" style="
                                                                float: left;
                                                                height: 600px;
                                                            ">
                                                            <div style="margin-bottom: 1rem">
                                                                <button pButton type="button" label="全部展开"
                                                                    (click)="expandAll()"
                                                                    style="margin-right: 0.5rem"></button>
                                                                <button pButton type="button" label="全部折叠"
                                                                    (click)="collapseAll()"
                                                                    style="margin-right: 0.5rem"></button>
                                                                <button
                                                                    [disabled]="ischeckTree&&(ischeckTree.nodeLevel==8||ischeckTree.nodeLevel==9||ischeckTree.isRelation==1)"
                                                                    pButton type="button" label="新增"
                                                                    (click)="insertBopTree(true)"
                                                                    style="margin-right: 0.5rem"></button>
                                                                <button
                                                                    [disabled]="ischeckTree&&(ischeckTree.nodeLevel==8||ischeckTree.nodeLevel==9||ischeckTree.key==-1 || ischeckTree.isRelation==1)"
                                                                    pButton type="button" label="修改"
                                                                    (click)="insertBopTree(false)"
                                                                    style="margin-right: 0.5rem"></button>
                                                                <button
                                                                    [disabled]="ischeckTree&&(ischeckTree.nodeLevel==8||ischeckTree.nodeLevel==9||ischeckTree.key==-1 || ischeckTree.isRelation==1)"
                                                                    pButton type="button" label="删除"
                                                                    (click)="deleteItem()"
                                                                    style="margin-right: 0.5rem"></button>

                                                            </div>
                                                            <div style="margin-bottom: 1rem">
                                                                <button
                                                                    [disabled]="ischeckTree&&(ischeckTree.nodeLevel==8||ischeckTree.nodeLevel==9||ischeckTree.key==-1||ischeckTree.nodeLevel==1||ischeckTree.isRelation==1)"
                                                                    pButton type="button" label="导入规程"
                                                                    (click)="toExcelDraw()"
                                                                    style="margin-right: 0.5rem"></button>
                                                                <button pButton type="button" label="解绑规程"
                                                                    [disabled]="ischeckTree&&(ischeckTree.isRelation!=1||ischeckTree.isExport==1)"
                                                                    (click)="backItem()"
                                                                    style="margin-right: 0.5rem"></button>
                                                                <button pButton type="button" label="导出规程"
                                                                    [disabled]="ischeckTree&&(ischeckTree.nodeLevel!=8&&ischeckTree.nodeLevel!=9&&ischeckTree.isRelation!=1)||(ischeckTree&&ischeckTree.isExport==1)"
                                                                    (click)="toExcelItem()"
                                                                    style="margin-right: 0.5rem"></button>
                                                                <button pButton type="button" label="Bop引用"
                                                                    (click)="bopImport()" [disabled]="!canBop"
                                                                    style="margin-right: 0.5rem"></button>
                                                            </div>
                                                            <p-tree [value]="files2" selectionMode="single"
                                                                [(selection)]="selectedFiles"
                                                                (onNodeSelect)="nodeSelect($event)"
                                                                [style]="{ height: '90%' }" [loading]="loadingtree">
                                                                <ng-template let-node pTemplate="default">
                                                                    <img class="imgcontent"
                                                                        src="../../../assets/common/images/三级图标.png"
                                                                        *ngIf="node.nodeLevel==8||node.nodeLevel==9"
                                                                        width="20" height="20" />
                                                                    <img class="imgcontent"
                                                                        src="../../../assets/common/images/0.png"
                                                                        *ngIf="node.nodeLevel==undefind" width="20"
                                                                        height="20" />
                                                                    <img class="imgcontent"
                                                                        src="../../../assets/common/images/1.png"
                                                                        *ngIf="node.nodeLevel==1" width="20"
                                                                        height="20" />
                                                                    <img class="imgcontent"
                                                                        src="../../../assets/common/images/2.png"
                                                                        *ngIf="node.nodeLevel==2" width="20"
                                                                        height="20" />
                                                                    <img class="imgcontent"
                                                                        src="../../../assets/common/images/3.png"
                                                                        *ngIf="node.nodeLevel==3" width="20"
                                                                        height="20" />
                                                                    <img class="imgcontent"
                                                                        src="../../../assets/common/images/4.png"
                                                                        *ngIf="node.nodeLevel==4" width="20"
                                                                        height="20" />
                                                                    <img class="imgcontent"
                                                                        src="../../../assets/common/images/5.png"
                                                                        *ngIf="node.nodeLevel==5" width="20"
                                                                        height="20" />
                                                                    <!-- [class]="(node.nodeLevel!=8&&node.nodeLevel!=9)?'pi pi-folder':node.nodeLevel==8?'pi pi-list':'pi pi-file'" -->
                                                                    <span
                                                                        *ngIf="node.key==-1">{{node.model}}-{{node.lotNo}}-{{node.nodeDrawingNo}}-{{node.nodeName}}-{{node.stageSign}}</span>
                                                                    <span
                                                                        *ngIf="node.key!=-1">{{node.nodeDrawingNo}}-{{node.nodeName}}</span>
                                                                    <span class="ptagisRelation"
                                                                        *ngIf="node.isRelation==1&&node.isExport!=1">{{node.isRelation==1?'已关联':''}}</span>
                                                                    <span class="ptagisExport"
                                                                        *ngIf="node.isExport==1">{{node.isExport==1?'已导出':''}}</span>
                                                                </ng-template>
                                                            </p-tree>
                                                        </div>

                                                    </div>
                                                    <!--<Primeng-TurboTable-End>-->
                                                </div>
                                                <!-- </div> -->
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-8">
                                    <!-- 工艺 -->
                                    <div *ngIf="ischeckTree&&ischeckTree.nodeLevel!=8&&ischeckTree.nodeLevel!=9">
                                        <span class="title">BOP详情</span>
                                        <p-tabView [style]="{ height: '700px' }">
                                            <!--<p-tabPanel header="部套描述" [selected]="true">
                                                <div class="col-xl-12" style="height: 600px;">
                                                    <div class="col-md-6" class="item-content" style="float: left" *ngIf="isParent">
                                                        发次代码：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{ischeckTree?ischeckTree.nodeDrawingNo:''}}
                                                        </span>
                                                    </div>
                                                    <div class="col-md-6" class="item-content" style="float: left" *ngIf="isSon">
                                                        芯级代码：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{ischeckTree?ischeckTree.nodeDrawingNo:''}}
                                                        </span>
                                                    </div>
                                                    <div class="col-md-6" class="item-content" style="float: left" *ngIf="isGrandSon">
                                                        部套代码：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{ischeckTree?ischeckTree.nodeDrawingNo:''}}
                                                        </span>
                                                    </div>
                                                    <div class="col-md-6" class="item-content" style="float: left" *ngIf="isGrandSons">
                                                        工作项目代码：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{ischeckTree?ischeckTree.nodeDrawingNo:''}}
                                                        </span>
                                                    </div>
                                                    <div class="col-md-6" class="item-content" style="float: left">
                                                        部套名称：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{ischeckTree?ischeckTree.nodeName:''}}
                                                        </span>
                                                    </div>
                                                    <button type="submit" style="float: left;overflow: auto;"
                                                        class="btn btn-primary" [buttonBusy]="saving"
                                                        [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i>
                                                        <span>保存</span></button>
                                                    <div class="col-md-12"
                                                        style="float: left;overflow: auto;height: 90%">
                                                        <form *ngIf="active" #itemInfo="ngForm" novalidate
                                                            (ngSubmit)="save()" autocomplete="off">
                                                            <div class="modal-body">
                                                                <div class="form-group">
                                                                    <label for="nodeDrawingNo">图号</label>
                                                                    <input id="nodeDrawingNo" readonly
                                                                        #nodeDrawingNoInput="ngModel"
                                                                        name="nodeDrawingNo" class="form-control"
                                                                        [(ngModel)]="btInfo.nodeDrawingNo" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="nodeName">名称</label>
                                                                    <input id="nodeName" readonly
                                                                        #nodeNameInput="ngModel" name="nodeName"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.nodeName" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="processName">工艺规程名称</label>
                                                                    <input id="processName" readonly
                                                                        #processNameInput="ngModel" name="processName"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.processName" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="processCode">工艺规程编号</label>
                                                                    <input id="processCode" readonly
                                                                        #processCodeInput="ngModel" name="processCode"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.processCode" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="nodeStageSign">阶段标记:</label>
                                                                     <input id="nodeStageSign" readonly #nodeStageSignInput="ngModel"  name="nodeStageSign" class="form-control" [(ngModel)]="btInfo.nodeStageSign" required maxlength="256"  /> 
                                                                    <span
                                                                        style="margin-right: 15px;color:blue;font-weight: bold;">{{btInfo.nodeStageSign==1?'S':btInfo.nodeStageSign==2?'D':''}}</span>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="btInfoDate">规程关联时间</label>
                                                                    <input id="btInfoDate" readonly
                                                                        #processCodeInput="ngModel" name="btInfoDate"
                                                                        class="form-control" [(ngModel)]="btInfoDate"
                                                                        required maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="padName">规程导出PAD</label>
                                                                    <input id="padName" readonly
                                                                        #processCodeInput="ngModel" name="padName"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.padName" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="btInfoNewDate">规程导出时间</label>
                                                                    <input id="btInfoNewDate" readonly
                                                                        #processCodeInput="ngModel" name="btInfoNewDate"
                                                                        class="form-control" [(ngModel)]="btInfoNewDate"
                                                                        required maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="remark">备注 *</label>
                                                                    <textarea id="remark" pInputTextarea
                                                                        #remarkInput="ngModel" name="remark"
                                                                        class="form-control" [(ngModel)]="btInfo.remark"
                                                                        required maxlength="256"></textarea>
                                                                </div>
                                                            </div>
                                                        </form>
                                                    </div>
                                                </div>
                                            </p-tabPanel>-->

                                            <p-tabPanel [header]="titleLable" [selected]="true">
                                                <div class="col-xl-12" style="height: 600px;">
                                                    <div class="col-md-6" class="item-content" style="float: left">
                                                        {{titleName}}代码：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{ischeckTree?ischeckTree.nodeDrawingNo:''}}
                                                        </span>
                                                    </div>
                                                    <div class="col-md-6" class="item-content" style="float: left">
                                                        {{titleName}}名称：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{ischeckTree?ischeckTree.nodeName:''}}
                                                        </span>
                                                    </div>
                                                    <div class="col-md-12"
                                                        style="float: left;overflow: auto;height: 90%" *ngIf="isParent">
                                                        <form *ngIf="active" #itemInfo="ngForm" novalidate
                                                            (ngSubmit)="save()" autocomplete="off">
                                                            <div class="modal-body">
                                                                <div class="form-group">
                                                                    <label for="model">型号</label>
                                                                    <input id="model" readonly
                                                                        #nodeDrawingNoInput="ngModel" name="model"
                                                                        class="form-control"
                                                                        [(ngModel)]="parentInfo.model" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="lotNo">发次</label>
                                                                    <input id="lotNo" readonly #nodeNameInput="ngModel"
                                                                        name="lotNo" class="form-control"
                                                                        [(ngModel)]="parentInfo.lotNo" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="modelName">名称</label>
                                                                    <input id="modelName" readonly
                                                                        #processNameInput="ngModel" name="modelName"
                                                                        class="form-control"
                                                                        [(ngModel)]="parentInfo.modelName" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="drawingNo">图号</label>
                                                                    <input id="drawingNo" readonly
                                                                        #processCodeInput="ngModel" name="drawingNo"
                                                                        class="form-control"
                                                                        [(ngModel)]="parentInfo.drawingNo" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="stageSign">阶段标记:</label>
                                                                    <input id="stageSign" readonly
                                                                        #processCodeInput="ngModel" name="stageSign"
                                                                        class="form-control"
                                                                        [(ngModel)]="parentInfo.stageSign" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="userName">创建人</label>
                                                                    <input id="userName" readonly
                                                                        #processCodeInput="ngModel" name="userName"
                                                                        class="form-control"
                                                                        [(ngModel)]="parentInfo.userName" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="creationTime">创建时间</label>
                                                                    <input id="creationTime" readonly
                                                                        #processCodeInput="ngModel" name="creationTime"
                                                                        class="form-control"
                                                                        [(ngModel)]="parentInfo.creationTime" required
                                                                        maxlength="256" />
                                                                </div>
                                                            </div>
                                                        </form>
                                                    </div>
                                                    <div class="col-md-12"
                                                        style="float: left;overflow: auto;height: 90%" *ngIf="isSon">
                                                        <form *ngIf="active" #itemInfo="ngForm" novalidate
                                                            (ngSubmit)="save()" autocomplete="off">
                                                            <div class="modal-body">
                                                                <div class="form-group">
                                                                    <label for="nodeDrawingNo">图号</label>
                                                                    <input id="nodeDrawingNo" readonly
                                                                        #processCodeInput="ngModel" name="nodeDrawingNo"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.nodeDrawingNo" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="nodeName">名称</label>
                                                                    <input id="nodeName" readonly
                                                                        #processNameInput="ngModel" name="nodeName"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.nodeName" required
                                                                        maxlength="256" />
                                                                </div>
                                                            </div>
                                                        </form>
                                                    </div>
                                                    <div class="col-md-12"
                                                        style="float: left;overflow: auto;height: 90%"
                                                        *ngIf="isGrandSon">
                                                        <form *ngIf="active" #itemInfo="ngForm" novalidate
                                                            (ngSubmit)="save()" autocomplete="off">
                                                            <div class="modal-body">
                                                                <div class="form-group">
                                                                    <label for="nodeDrawingNo">图号</label>
                                                                    <input id="nodeDrawingNo" readonly
                                                                        #processCodeInput="ngModel" name="nodeDrawingNo"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.nodeDrawingNo" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="nodeName">名称</label>
                                                                    <input id="nodeName" readonly
                                                                        #processNameInput="ngModel" name="nodeName"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.nodeName" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <hr style="margin-top: 50px;
                                                            height: 25px;
                                                            border-color: #AAAAAA;">
                                                                <div class="form-group">
                                                                    <label for="btInfoDate">规程关联时间</label>
                                                                    <input id="btInfoDate" readonly
                                                                        #processCodeInput="ngModel" name="btInfoDate"
                                                                        class="form-control" [(ngModel)]="btInfoDate"
                                                                        required maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="padName">规程导出PAD</label>
                                                                    <input id="padName" readonly
                                                                        #processCodeInput="ngModel" name="padName"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.padName" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="btInfoNewDate">规程导出时间</label>
                                                                    <input id="btInfoNewDate" readonly
                                                                        #processCodeInput="ngModel" name="btInfoNewDate"
                                                                        class="form-control" [(ngModel)]="btInfoNewDate"
                                                                        required maxlength="256" />
                                                                </div>
                                                            </div>
                                                        </form>
                                                    </div>
                                                    <div class="col-md-12"
                                                        style="float: left;overflow: auto;height: 90%"
                                                        *ngIf="isGrandSons">
                                                        <form *ngIf="active" #itemInfo="ngForm" novalidate
                                                            (ngSubmit)="save()" autocomplete="off">
                                                            <div class="modal-body">
                                                                <div class="form-group">
                                                                    <label for="nodeDrawingNo">图号</label>
                                                                    <input id="nodeDrawingNo" readonly
                                                                        #processCodeInput="ngModel" name="nodeDrawingNo"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.nodeDrawingNo" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="nodeName">名称</label>
                                                                    <input id="nodeName" readonly
                                                                        #processNameInput="ngModel" name="nodeName"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.nodeName" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <hr style="margin-top: 50px;
                                                            height: 25px;
                                                            border-color: #AAAAAA;">
                                                                <div class="form-group">
                                                                    <label for="btInfoDate">规程关联时间</label>
                                                                    <input id="btInfoDate" readonly
                                                                        #processCodeInput="ngModel" name="btInfoDate"
                                                                        class="form-control" [(ngModel)]="btInfoDate"
                                                                        required maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="padName">规程导出PAD</label>
                                                                    <input id="padName" readonly
                                                                        #processCodeInput="ngModel" name="padName"
                                                                        class="form-control"
                                                                        [(ngModel)]="btInfo.padName" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="btInfoNewDate">规程导出时间</label>
                                                                    <input id="btInfoNewDate" readonly
                                                                        #processCodeInput="ngModel" name="btInfoNewDate"
                                                                        class="form-control" [(ngModel)]="btInfoNewDate"
                                                                        required maxlength="256" />
                                                                </div>
                                                            </div>
                                                        </form>
                                                    </div>
                                                </div>
                                            </p-tabPanel>
                                            <p-tabPanel header="路线管理">
                                                <div class="col-xl-12" style="height: 600px;position: relative;">
                                                    <div class="item-content"
                                                        style="position: absolute;top: 0px; left: 15px;z-index: 999;">
                                                        <p-button label="保存路线" (onClick)="saveMap()"></p-button>
                                                    </div>
                                                    <div #diagramDiv class="paletteDiv"></div>
                                                </div>
                                            </p-tabPanel>
                                            <p-tabPanel header="工艺规程" *ngIf="!isParent && !isSon">

                                                <div class="col-xl-12" style="height: 600px;">
                                                    <div class="col-md-6" class="item-content" style="float: left">
                                                        工艺规程编号：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{processFile?processFile.techniqueNumber:''}}
                                                        </span>
                                                    </div>
                                                    <div class="col-md-6" class="item-content" style="float: left">
                                                        工艺规程名称：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{processFile?processFile.techniqueName:''}}
                                                        </span>
                                                    </div>

                                                    <div class="col-md-12"
                                                        style=" float: left;overflow: auto;height: 90%">
                                                        <form *ngIf="active" #itemInfo="ngForm" novalidate
                                                            autocomplete="off">
                                                            <div class="modal-body">
                                                                <div class="form-group">
                                                                    <label for="techniqueNumber">文件编号</label>
                                                                    <input id="techniqueNumber" readonly
                                                                        #techniqueNumberInput="ngModel"
                                                                        name="techniqueNumber" class="form-control"
                                                                        [(ngModel)]="processFile.techniqueNumber"
                                                                        required maxlength="256" />

                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="techniqueName">工艺文件名称</label>
                                                                    <input id="techniqueName" readonly
                                                                        #techniqueNameInput="ngModel"
                                                                        name="techniqueName" class="form-control"
                                                                        [(ngModel)]="processFile.techniqueName" required
                                                                        maxlength="256" />

                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="edition">子版本</label>
                                                                    <input id="edition" readonly name="edition"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.edition" required
                                                                        maxlength="256" />

                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="systemCode">产品系统代号</label>
                                                                    <input id="systemCode" readonly
                                                                        #systemCodeInput="ngModel" name="systemCode"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.systemCode" required
                                                                        maxlength="256" />

                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="productCode">产品代号</label>
                                                                    <input id="productCode" readonly
                                                                        #processCodeInput="ngModel" name="productCode"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.productCode" required
                                                                        maxlength="256" />

                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="moduleCode">零部组件代号:</label>
                                                                    <input id="moduleCode" readonly
                                                                        #moduleCodeInput="ngModel" name="moduleCode"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.moduleCode" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="moduleName">零部组件名称:</label>
                                                                    <input id="moduleName" readonly
                                                                        #moduleNameInput="ngModel" name="moduleName"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.moduleName" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="nodeStageSign">阶段标记:</label>
                                                                    <input id="stageSign" readonly
                                                                        #processCodeInput="ngModel" name="stageSign"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.stageSign" required
                                                                        maxlength="256" />
                                                                    <!-- <input id="nodeStageSign" readonly #nodeStageSignInput="ngModel"  name="nodeStageSign" class="form-control" [(ngModel)]="btInfo.nodeStageSign" required maxlength="256"  /> -->
                                                                    <!-- <span
                                                                        style="margin-right: 15px;color:blue;font-weight: bold;">{{btInfo.nodeStageSign==1?'S':btInfo.nodeStageSign==2?'D':''}}</span> -->
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="techniqueTypeDesc">工艺规程类型:</label>
                                                                    <input id="techniqueTypeDesc" readonly
                                                                        #techniqueTypeInput="ngModel"
                                                                        name="techniqueTypeDesc" class="form-control"
                                                                        [(ngModel)]="processFile.techniqueTypeDesc"
                                                                        required maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="techniqueCharacter">工艺规程特性:</label>
                                                                    <input id="techniqueCharacter" readonly
                                                                        #techniqueCharacterInput="ngModel"
                                                                        name="techniqueCharacter" class="form-control"
                                                                        [(ngModel)]="processFile.techniqueCharacter"
                                                                        required maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="shapeDesc">纸质形式:</label>
                                                                    <input id="shapeDesc" readonly
                                                                        #processCodeInput="ngModel" name="shapeDesc"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.shapeDesc" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="secretDegreeDesc">文件密级:</label>
                                                                    <input id="secretDegreeDesc" readonly
                                                                        #secretDegreeInput="ngModel"
                                                                        name="secretDegreeDesc" class="form-control"
                                                                        [(ngModel)]="processFile.secretDegreeDesc"
                                                                        required maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="useUnit">使用单位:</label>
                                                                    <input id="useUnit" readonly #useUnitInput="ngModel"
                                                                        name="useUnit" class="form-control"
                                                                        [(ngModel)]="processFile.useUnit" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="useTime">使用时间:</label>
                                                                    <input id="useTime" readonly #useTimeInput="ngModel"
                                                                        name="useTime" class="form-control"
                                                                        [(ngModel)]="processFile.useTime" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="basisFile">依据文件:</label>
                                                                    <input id="basisFile" readonly
                                                                        #basisFileInput="ngModel" name="basisFile"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.basisFile" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="issueUnit">分发单位:</label>
                                                                    <input id="issueUnit" readonly
                                                                        #issueUnitInput="ngModel" name="issueUnit"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.issueUnit" required
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="Proofreader">校对人:</label>
                                                                    <input id="Proofreader" readonly
                                                                     name="Proofreader"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.proofreader"
                                                                        maxlength="256"/>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="ProofreaderTime">校对时间:</label>
                                                                    <input id="ProofreaderTime" readonly
                                                                     name="ProofreaderTime"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.proofreaderTime"
                                                                        maxlength="256"/>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="Reviewer">审核人:</label>
                                                                    <input id="Reviewer" readonly
                                                                     name="Reviewer"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.reviewer"
                                                                        maxlength="256"/>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="ReviewerTime">审核时间:</label>
                                                                    <input id="ReviewerTime" readonly
                                                                     name="ReviewerTime"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.reviewerTime"
                                                                        maxlength="256"/>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="Inspector">标检人:</label>
                                                                    <input id="Inspector" readonly
                                                                     name="Inspector"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.inspector"
                                                                        maxlength="256"/>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="InspectorTime">标检时间:</label>
                                                                    <input id="InspectorTime" readonly
                                                                     name="InspectorTime"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.inspectorTime"
                                                                        maxlength="256"/>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="Certifier">批准人:</label>
                                                                    <input id="Certifier" readonly
                                                                     name="Certifier"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.certifier"
                                                                        maxlength="256"/>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="CertifierTime"> 批准时间:</label>
                                                                    <input id="CertifierTime" readonly
                                                                     name="CertifierTime"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.certifierTime"
                                                                        maxlength="256"/>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="workingHours"> 定额工时:</label>
                                                                    <input id="workingHours" type="number" (blur)="submitDetail(processFile)"
                                                                        name="workingHours" class="form-control"
                                                                        [(ngModel)]="processFile.workingHours"
                                                                        maxlength="256" />
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="remark">备注 *</label>
                                                                    <textarea id="remark" readonly pInputTextarea
                                                                        #remarkInput="ngModel" name="remark"
                                                                        class="form-control"
                                                                        [(ngModel)]="processFile.remark" required
                                                                        maxlength="256"></textarea>

                                                                </div>
                                                            </div>

                                                        </form>

                                                    </div>
                                                </div>
                                            </p-tabPanel>
                                            <p-tabPanel header="工艺说明卡片" *ngIf="!isParent && !isSon">
                                                <div class="item-content" style="float:left">工艺说明:</div>
                                                <div class="col-xl-12 m-badge m-badge--wide " style="height: 582px;">
                                                    <div id="pane1"
                                                        style="float: left;overflow: auto;height: 90%;text-align: left;">
                                                    </div>
                                                </div>
                                            </p-tabPanel>
                                        </p-tabView>
                                    </div>
                                    <div *ngIf="ischeckTree&&ischeckTree.nodeLevel==8">
                                        <!-- 工序 -->
                                        <span class="title">BOP详情</span>
                                        <p-tabView [style]="{ height: '700px' }">
                                            <p-tabPanel header="工序说明" [selected]="true">

                                                <div class="col-xl-12">
                                                    <div class="col-md-6" class="item-content" style="float: left">
                                                        工序代码：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{processInfo.processesSequence}}
                                                        </span>
                                                    </div>
                                                    <div class="col-md-6" class="item-content" style="float: left">
                                                        工序名称：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{processInfo.processesName}}
                                                        </span>
                                                        <span *ngFor="let item of check" style="border: 2.5px solid red;
                                                        color: red;
                                                        padding: 5px;
                                                        font-size: 16px;
                                                        margin-left: 20px;">
                                                            {{item}}
                                                        </span>
                                                    </div>
                                                    <div class="col-md-12" style=" float: left">
                                                        <div class="content" style="margin:10px;height:550px;
                                                        overflow:auto;" [innerHTML]="processInfo.processesExplain">
                                                        </div>

                                                    </div>
                                                </div>

                                            </p-tabPanel>
                                            <p-tabPanel header="路线管理">
                                                <div class="col-xl-12" style="height: 600px;position: relative;">
                                                    <div class="item-content"
                                                        style="position: absolute;top: 0px; left: 15px;z-index: 999;">
                                                        <p-button label="保存路线" (onClick)="saveMap()"></p-button>
                                                    </div>
                                                    <div #diagramDiv class="paletteDiv"></div>
                                                </div>
                                            </p-tabPanel>
                                        </p-tabView>
                                    </div>
                                    <div *ngIf="ischeckTree&&ischeckTree.nodeLevel==9">
                                        <span class="title">BOP详情</span>
                                        <p-tabView [style]="{ height: '700px' }">
                                            <p-tabPanel header="工步说明" [selected]="true">
                                                <div class="col-xl-24" style="height:30px;"
                                                    *ngIf="workstepInfo&&workstepInfo.processesSequence">
                                                    <div class="col-md-6" class="item-content" style="float: left">
                                                        工步代码：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{ischeckTree.nodeDrawingNo}}-{{ischeckTree.nodeName}}
                                                        </span>
                                                    </div>
                                                    <div class="col-md-6" class="item-content" style="float: left">
                                                        工序名称：
                                                        <span class="m-badge m-badge--success m-badge--wide">
                                                            {{workstepInfo.processesName}}
                                                        </span>
                                                        <span *ngFor="let item of workStepCheck" style="border:2.5px solid red;
                                                        color: red;
                                                        padding: 5px;
                                                        font-size:16px;
                                                        margin-left:20px;">
                                                            {{item}}
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="col-md-24" class="item-content-step" style="height:250px;">
                                                    <div class="col-md-6" class="item-content"
                                                        style="float: left;height:100%;">
                                                        <p-card header="工步信息" [style]="{width: '500px'}">
                                                            <div class="content" style="margin: 10px;"
                                                                [innerHTML]="workstepInfo&&workstepInfo.workStepOut&&workstepInfo.workStepOut.workStepName">
                                                            </div>
                                                        </p-card>
                                                    </div>
                                                    <div class="col-md-6" class="item-content"
                                                        style="float: left;height:100%;"
                                                        *ngIf="workstepInfo&&workstepInfo.workStepOut&&workstepInfo.workStepOut.workStepContent">
                                                        <p-card header=" " [style]="{width: '650px'}">
                                                            <div class="content"
                                                                [innerHTML]="workstepInfo&&workstepInfo.workStepOut&&workstepInfo.workStepOut.workStepContent">
                                                            </div>
                                                        </p-card>

                                                    </div>

                                                </div>

                                                <div class="col-md-24" class="item-content "
                                                    style="float: left;margin-top: 20px; height: 100%;">
                                                    <p-tabView (onChange)="onTabChange($event)" [styleClass]="tabclass">
                                                        <p-tabPanel [header]="tableitem.tableName" [selected]="i == 0"
                                                            *ngFor="let tableitem of workstepInfo.tableNameDictionary;let i = index">
                                                        </p-tabPanel>
                                                        <div class="col-xl-24">
                                                            <div class="primeng-datatable-container processlabel">
                                                                <p-table #dataTable [value]="workStepData"
                                                                    [paginator]="false" dataKey="id" [scrollable]="true"
                                                                    ScrollWidth="100%">
                                                                    <ng-template pTemplate="header">
                                                                        <tr>
                                                                            <th style="width: 100px"
                                                                                *ngFor="let headerItem of (workStepHeader&&workStepHeader.filedName?workStepHeader.filedName:[])">
                                                                                {{headerItem}}
                                                                            </th>
                                                                        </tr>
                                                                    </ng-template>
                                                                    <ng-template pTemplate="body"
                                                                        let-record="$implicit">
                                                                        <tr>
                                                                            <td style="width: 100px"
                                                                                *ngFor="let headerprop of (workStepHeader&&workStepHeader.filedDesc?workStepHeader.filedDesc:[])">
                                                                                <span class="ui-column-title"> </span>
                                                                                {{record[headerprop]}}
                                                                            </td>
                                                                        </tr>
                                                                    </ng-template>
                                                                </p-table>
                                                            </div>
                                                        </div>
                                                    </p-tabView>
                                                </div>
                                            </p-tabPanel>
                                            <p-tabPanel header="路线管理">
                                                <div class="col-xl-12" style="height: 600px;position: relative;">
                                                    <div class="item-content"
                                                        style="position: absolute;top: 0px; left: 15px;z-index: 999;">
                                                        <p-button label="保存路线" (onClick)="saveMap()"></p-button>
                                                    </div>
                                                    <div #diagramDiv class="paletteDiv"></div>
                                                </div>
                                            </p-tabPanel>
                                        </p-tabView>

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>



                <div class="modal-footer">
                    <!-- <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">{{"Cancel" | localize}}</button>
                    <button type="submit" class="btn btn-primary" [disabled]="!userForm.form.valid" [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>{{"Save" | localize}}</span></button> -->
                </div>
            </form>
        </div>
    </div>
    <!-- 路面弹窗 -->
    <p-sidebar (onHide)="onHide($event)" baseZIndex="0" [(visible)]="visibleSidebar" position="right">
        <h1 style="font-weight:normal">节点信息</h1>
        <div class="form-group" style="display: flex;margin-top: 20px">
            <label style="margin-top: 5px;margin-right: 10px;width: 55px;">图号：</label>
            <input [disabled]='mapForm.level != 3' id="nodeDrawingNo" type="text" name="nodeDrawingNo"
                class="form-control" [(ngModel)]="mapForm.nodeDrawingNo" maxlength="256" />
        </div>
        <div class="form-group" style="display: flex;margin-top: 20px">
            <label style="margin-top: 5px;margin-right: 10px;width: 55px;">名称：</label>
            <input [disabled]='mapForm.level != 3' id="textName" name="textName" type="text" class="form-control"
                [(ngModel)]="mapForm.text" maxlength="256" />
        </div>
        <div class="form-group" style="display: flex;margin-top: 20px">
            <label style="margin-top: 5px;margin-right: 10px;width: 55px;">工时：</label>
            <input *ngIf="mapForm.level == 4 " [disabled]='parentInfo.workingHourStatus == 1 ' id="workingHour" type="number" name="workingHour" class="form-control"
                [(ngModel)]="mapForm.workingHour" maxlength="256" />
            <input *ngIf="mapForm.level == 5 " [disabled]='parentInfo.workingHourStatus == 0 ' id="workingHour"
                type="number" name="workingHour" class="form-control" [(ngModel)]="mapForm.workingHour"
                maxlength="256" />
            <input *ngIf="mapForm.level != 4 && mapForm.level != 5 " disabled id="workingHour" type="number"
                name="workingHour" class="form-control" [(ngModel)]="mapForm.workingHour" maxlength="256" />
        </div>
        <div class="form-group" style="display: flex;margin-top: 20px">
            <label style="margin-top: 5px;margin-right: 10px;width: 55px;">属性：</label>
            <input disabled id="textm" type="text" name="textm"
                class="form-control" [(ngModel)]="mapForm.characteristic" maxlength="256" />
        </div>
        <p-button label="保存节点信息" (onClick)="saveMapItem()" style="margin-left: 80px;"></p-button>
    </p-sidebar>
    <!-- 新增BOP -->
    <createOrEditBopTreeModal #createOrEditBopTreeModal (modalSave)="getTreeInfo(true)" [parentrow]="ischeckTree"
        [bopInfo]="parentInfo"></createOrEditBopTreeModal>
    <!-- 导入工艺规程 -->
    <createOrEditDrawModal #createOrEditDrawModal (modalSave)="getTreeInfo(true)" [parentrow]="ischeckTree"
        [bopInfo]="parentInfo"></createOrEditDrawModal>
    <!-- 数据导出 -->
    <app-data-export #dataexport [params]="exportData" (modalSave)="getTreeInfo(true)"></app-data-export>
    <!-- BOP引入 -->
    <importBop #importBop (modalSave)="getTreeInfo(true)" [parentrow]="ischeckTree" [bopInfo]="parentInfo"></importBop>
</div>